package com.itheima.demo;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

public class UpdateDemo02 {
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");

        Connection conn = DriverManager.getConnection("jdbc:mysql://192.168.31.129:3306/demo3","root","root");

        Statement st = conn.createStatement();

        //String sql = "create table person(id int primary key auto_increment,name varchar(10),age int )";
        String sql = "insert into person(id, name, age) values(null, '张三', 18),(null, '李四', 20),(null, '王五', 22)";
        st.executeUpdate(sql);

        //conn.commit();
        st.close();
        conn.close();


    }
}
